﻿// -----------------------------------------------------------------------
// <copyright file="LibraryModuleElement.cs" company="EPAM Systems">
////Copyright (c) EPAM Systems, 2012. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------

namespace MBOP.Configuration.ConfigElements
{
	#region Usings

	using System;
	using System.Collections.Generic;
	using System.Configuration;
	using System.Globalization;
	using System.Linq;
	using System.Text;

	#endregion

	/// <summary>
	/// Provides the library module settings from config file.
	/// </summary>
	public class LibraryModuleElement : ConfigurationElement
	{
		#region Properties
		/// <summary>
		/// Gets or sets the max count of the books which can be displayed at the same time.
		/// </summary>
		[ConfigurationProperty("pageSize", IsRequired = true)]
		public int PageSize
		{
			get
			{
				return (int)this["pageSize"];
			}

			set
			{
				this["pageSize"] = value;
			}
		}

		/// <summary>
		/// Gets or sets the filters config element. 
		/// </summary>
		[ConfigurationProperty("filters")]
		public LibraryFiltersElement Filters 
		{
			get 
			{ 
				return (LibraryFiltersElement)this["filters"]; 
			}

			set 
			{ 
				this["filters"] = value; 
			}
		}

		#endregion
	}
}
